<?php
	include '../../db.php';
	if((isset($_GET['action']))&&(isset($_GET['cid']))){
		$custId = $_GET['cid'];
		if($_GET['action'] == 'remove'){
			$sql = "UPDATE customers SET isActive=0 WHERE customerID='$custId'";
			$url_target = 'Location:../../led-master.php?mngr=cust&subpg=view&action=custdelsuccess';	
		}else if($_GET['action'] == 'restore'){
			$sql = "UPDATE customers SET isActive=1 WHERE customerID='$custId'";
			$url_target = 'Location:../../led-master.php?mngr=cust&subpg=view&action=custressuccess';
		}
		@mysql_query($sql);		 
		header($url_target);
	}
?>